import { request } from '../service'
import IBaseObj from '#/index'

const queryMember = (data: IBaseObj) =>
  request({
    url: '/project/member/query',
    method: 'POST',
    data,
  })

const queryMemberList = (pid: string) =>
  request({
    url: `/project/Member/list/${pid}`,
    method: 'GET',
  })

const batchSaveMember = (data: IBaseObj) =>
  request({
    url: '/project/member/create/batch',
    method: 'POST',
    data,
  })

const modifyMemberRole = (data: { id: number; rid: number }) =>
  request({
    url: '/project/member/modify/role',
    method: 'PUT',
    data,
  })
const delUrl = '/project/member'

export default {
  queryMember,
  queryMemberList,
  batchSaveMember,
  modifyMemberRole,
  delUrl,
}
